﻿
namespace B.S.Databasic.Api.Read.Common
{
    public class IdentivyService : IIdentivyService
    {
        private readonly IHttpContextAccessor httpContextAccessor;

        public IdentivyService(IHttpContextAccessor httpContextAccessor)
        {
            this.httpContextAccessor = httpContextAccessor;
            Uid = httpContextAccessor.HttpContext.User.FindFirst("UserId")?.Value;
            Uname = httpContextAccessor.HttpContext.User.FindFirst("UserName")?.Value;
        }
        public string Uid { get; set; }
        public string Uname { get; set; }
    }
    public interface IIdentivyService
    {
        public string Uid { get; set; }
        public string Uname { get; set; }
    }
}
